import reqAxios from '@/utils/request'
// 获取员工列表
export function getPage(params) {
  return reqAxios({
    url: `/users`,
    method: 'get',
    params
  })
}
// 添加员工
export function addPage(data) {
  return reqAxios({
    url: `/users`,
    method: 'POST',
    data
  })
}
// 编辑
export function PjPage(data) {
  return reqAxios({
    url: `/users/${data.id}`,
    method: 'put',
    data
  })
}
// 删除
export function delPage(id) {
  return reqAxios({
    url: `/users/${id}`,
    method: 'DELETE'
  })
}
// 获取指定用户
export function zdPage(id) {
  return reqAxios({
    url: `/users/${id}`,
    method: 'get'
  })
}
// 获取用户数量
export function slPage() {
  return reqAxios({
    url: `/users/count`,
    method: 'get'
  })
}
